package com.siyu.model.dispatch.io;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.siyu.basedata.wrprsrbsin.domain.WrpRsrBsin;
import com.siyu.basedata.wrprsrbsin.service.IWrpRsrBsinService;
import com.siyu.model.dispatch.dto.DispatchDto;
import com.siyu.model.dispatch.utils.CommonUtils;
import com.siyu.model.dispatch.utils.CurveDataItem;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import static com.siyu.model.dispatch.utils.ParamMakeUtils.paramMakeUtils;

/**
 * 读取单座水库数据的相关方法
 *
 * @author xinchan
 * @version 1.0.1 2021-12-06
 */
public class SingleReservoir {



    private final String folderPath;
    public SingleReservoir(String folderPath) {
        this.folderPath = folderPath;
    }

    /**
     * 读取单座水库的数据，现在是从txt，后面改为数据库读取。
     *
     * @param dispatchDto
     * @return 单座水库参数对象(SingleDamInput)
     * @throws IOException
     */
    public SingleDamInput getSingleDamInput(DispatchDto dispatchDto) throws Exception {
        SingleDamInput singleDamInput = paramMakeUtils.dispatchParaInit(dispatchDto);
        return singleDamInput;
    }

    /**
     * 返回带有相关输入信息的闸坝输入类 SingleSluiceInput
     *
     * @param sluiceName 闸坝名称
     * @return
     */
    public SingleSluiceInput getSingleSluiceInput(String sluiceName, String sluiceID) {
        SingleSluiceInput singleSluiceInput = new SingleSluiceInput(sluiceName, sluiceID);
        return singleSluiceInput;
    }
}
